﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace TacticalGridWarsMapEdit
{
    /// <summary>
    /// Form that takes input about mapsize
    /// </summary>
    public partial class FormProperties : Form
    {
        public int Rows { get; set; }
        public int Columns { get; set; }

        public FormProperties()
        {
            InitializeComponent();
        }

        private void buttonOK_Click(object sender, EventArgs e)
        {
            try
            {
                Rows = Convert.ToInt32(textBoxRows.Text);
                Columns = Convert.ToInt32(textBoxColumns.Text);
                this.DialogResult = DialogResult.OK;
            }
            catch (Exception crap)
            {
                MessageBox.Show(crap.Message, "Exception", MessageBoxButtons.OK);
            }            
        }
    }
}
